using UnityEngine;
public class Buff3 : PlayerControllerBuffBase
{
    float m_DamagePerSecond = 30f;
    float m_Timer = 0;
    float m_HitPerSecond = 2;
    float m_HitDamage;
    float m_HitInterval;
    #region Public方法
    public override void AfterBeAdded()
    {
        m_HitDamage = m_DamagePerSecond / m_HitPerSecond;
        m_HitInterval = 1 / m_HitPerSecond;
    }
    public override string GetDescription()
    {
        return $"每秒受到[{m_DamagePerSecond}*层数]点伤害。";
    }

    public override void FixedUpdate()
    {
        m_Timer += Time.fixedDeltaTime;
        if (m_Timer >= m_HitInterval)
        {
            m_Timer -= m_HitInterval;
            Owner.CurrentHealth -= m_HitDamage*CurrentLevel;
        }
    }
    #endregion

    #region Private方法

    #endregion
}